﻿using SimpleESBCore.Implement;
using SimpleESBServer.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace SimpleESBServer
{
    public class GlobalClass
    {
        private Socket serverHeartSocket;//保存服务端的心跳Socket
        private Socket serverDataSocket;//保存服务端的数据Socket
        public Dictionary<string, List<ClientInfo>> TopicSockets = new Dictionary<string, List<ClientInfo>>();//用于保存主题名称和对应的订阅客户端信息
        public Dictionary<string, List<EventBase>> EventLists = new Dictionary<string, List<EventBase>>();//用于保存接收到事件信息
        public List<ClientHeartInfo> ClientHeartInfos = new List<ClientHeartInfo>();//用于保存获取到的客户端的心跳信息
        public List<ClientInfo> ClientInfos = new List<ClientInfo>();//用于保存获取到的客户端的数据信息
        public Socket ServerHeartSocket
        {
            get { return serverHeartSocket; }
            set { serverHeartSocket = value; }
        }
        public Socket ServerDataSocket
        {
            get { return serverDataSocket; }
            set { serverDataSocket = value; }
        }
    }
}
